# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
#
# from AUR - adadapted to our style
#
# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Michal Hybner <dta081@gmail.com>

pkgname=libosip2
pkgver=5.3.1
pkgrel=1
pkgdesc='An implementation of SIP.'
arch=('x86_64' 'aarch64')
url='http://www.gnu.org/software/osip/'
license=('LGPL')
depends=('glibc')
options=(!emptydirs)
source=(https://ftp.gnu.org/gnu/osip/libosip2-${pkgver/_/-}.tar.gz)
sha512sums=('cd9db7a736cca90c6862b84c4941ef025f5affab8af9bbc02ce0dd3310a2c555e0922c1bfa72d8ac08791fa1441bbcc30b627d52ca8b51f3471573a10ac82a00')

build() {
  cd "$pkgname-${pkgver/_/-}/"

  ./configure --prefix=/usr --disable-semaphore --enable-sysv

  # Fight unused direct deps
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool

  make
}

package() {
  cd "$pkgname-${pkgver/_/-}/"

  make DESTDIR="$pkgdir" install
}

